package com.hmall.common.feign.item;

import com.hmall.common.intercpptr.MyFeignInterceptor;
import feign.QueryMap;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @param
 * @return
 */
//调用item服务
@FeignClient(name = "itemservice",configuration = MyFeignInterceptor.class )
public interface ItemFeignClient {
    @GetMapping("/item/{id}")
     Item findById(@PathVariable("id") Long id);

    @GetMapping("/item")
     Integer Inventory (@RequestParam("id") Long id,@RequestParam("num") Long num);
}
